From 7a4ebfbb402bcd4655072276a823d728904afb6a Mon Sep 17 00:00:00 2001 From: "kaf24@labyrinth.cl.cam.ac.uk" Date: Mon, 17 Feb 2003 11:45:18 +0000 Subject: [PATCH] bitkeeper revision 1.62 (3e50cb4eg-PMPCWTPi41yy_fZzVykw) page.h, traps.c: Improve BUG tracing. We now get registers + stack. --- xen-2.4.16/arch/i386/traps.c | 6 +++++- xen-2.4.16/include/asm-i386/page.h | 8 +------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/xen-2.4.16/arch/i386/traps.c b/xen-2.4.16/arch/i386/traps.c index f7d18610a0..8c71f78542 100644 --- a/xen-2.4.16/arch/i386/traps.c +++ b/xen-2.4.16/arch/i386/traps.c @@ -119,6 +119,8 @@ void show_stack(unsigned long * esp) if(esp==NULL) esp=(unsigned long*)&esp; + printk("Stack trace from ESP=%p:\n", esp); + stack = esp; for(i=0; i < kstack_depth_to_print; i++) { if (((long) stack & (THREAD_SIZE-1)) == 0) @@ -128,7 +130,7 @@ void show_stack(unsigned long * esp) printk("%08lx ", *stack++); } printk("\n"); - show_trace(esp); + //show_trace(esp); } void show_registers(struct pt_regs *regs) @@ -152,6 +154,8 @@ void show_registers(struct pt_regs *regs) regs->esi, regs->edi, regs->ebp, esp); printk("ds: %04x es: %04x ss: %04x\n", regs->xds & 0xffff, regs->xes & 0xffff, ss); + + show_stack(®s->esp); } diff --git a/xen-2.4.16/include/asm-i386/page.h b/xen-2.4.16/include/asm-i386/page.h index 2929d7e6b7..63b5c73afd 100644 --- a/xen-2.4.16/include/asm-i386/page.h +++ b/xen-2.4.16/include/asm-i386/page.h @@ -3,16 +3,10 @@ #ifndef __ASSEMBLY__ -#ifdef CONFIG_DEBUG_BUGVERBOSE -extern void do_BUG(const char *file, int line); #define BUG() do { \ - do_BUG(__FILE__, __LINE__); \ + printk("BUG at %s:%d\n", __FILE__, __LINE__); \ __asm__ __volatile__("ud2"); \ } while (0) -#else -#include -#define BUG() (panic("BUG at %s:%d\n", __FILE__, __LINE__)) -#endif #endif /* __ASSEMBLY__ */ -- 2.30.2